package com.sxbbc.common.core.entity.jz;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * APP banner图
 * </p>
 *
 * @author leehao
 * @since 2019-05-14
 */
@TableName("app_banner")
public class AppBanner extends Model<AppBanner> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * banner 图片
     */
    private String icon;

    /**
     * 事件见EventEnums枚举类
     */
    private String event;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 地址
     */
    private String url;

    /**
     * 1app 2小程序 3微信 4pc
     */
    private Integer position;

    /**
     * 1首页 其它类型待新增 
     */
    private Integer type;

    /**
     * 事件名称
     */
    @TableField(exist = false)
    private String eventName;

    /**
     * banner图位置
     */
    @TableField(exist = false)
    private String bannerPosition;

    /**
     * api是否orderBy条件标记
     */
    @TableField(exist = false)
    private boolean orderFlag;

    /**
     * 产品类型 用于app跳转前判断
     */
    @TableField(exist = false)
    private Integer proType;

    public AppBanner() {
    }

    public AppBanner(Integer position, Integer type) {
        this.position = position;
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getBannerPosition() {
        return bannerPosition;
    }

    public void setBannerPosition(String bannerPosition) {
        this.bannerPosition = bannerPosition;
    }

    public boolean isOrderFlag() {
        return orderFlag;
    }

    public void setOrderFlag(boolean orderFlag) {
        this.orderFlag = orderFlag;
    }

    public Integer getProType() {
        return proType;
    }

    public void setProType(Integer proType) {
        this.proType = proType;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AppBanner{" +
        "id=" + id +
        ", icon=" + icon +
        ", event=" + event +
        ", sort=" + sort +
        ", url=" + url +
        ", position=" + position +
        ", type=" + type +
        "}";
    }
}
